/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.oai.metadataRepository.analysis.cli.actions;

import cz.mzk.oai.metadataRepository.analysis.Analysis;
import cz.mzk.oai.metadataRepository.analysis.RecordPrintOptions;
import cz.mzk.oai.metadataRepository.analysis.Analyzer;
import cz.mzk.oai.metadataRepository.analysis.impl.EseElementAnalysis;
import cz.mzk.oai.metadataRepository.repository.collections.MetadataCollection;
import cz.mzk.oai.metadataRepository.repository.Repository;

/**
 *
 * @author Martin Řehánek (rehan at mzk.cz)
 */
public final class AnalyzeEseAction extends AnalyzeElementAction {

    //TODO: prejmenovat printValues
    private final String prefixedElement;

    public AnalyzeEseAction(Repository rep, String element, String collection, boolean printValues, boolean printIdentifiers, RecordPrintOptions options) throws Exception {
        super(rep, collection, printValues, printIdentifiers, options);
        this.prefixedElement = element;
    }

    void analyze(MetadataCollection collection) {
        Analysis analysis = new EseElementAnalysis(prefixedElement);
        Analyzer analyzer = new Analyzer(analysis, collection, options);
        analyzer.analyzeAndPrintResults(printValues, printIdentifiers);
    }
}
